/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.sys.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 附件信息Entity
 * @author wzl
 * @version 2018-10-12
 */
public class Attachment extends DataEntity<Attachment> {
	
	private static final long serialVersionUID = 1L;
	private String tableId;		// 表ID
	private String tableName;		// 表名
	private String filePath;		// 图片路径信息(原图)
	private String fileType;		// 文件类型
	private String fileSize;		// 文件大小
	private String fileName;		// 文件名称
	private Integer version;		// 版本
	private String type;
	//辅助字段
	private String file; // base64 文件上传


	public Attachment() {
		super();
	}
	/**
	 * @author Zhang Xingliang
	 * @description 重构
	 * @date 10:23 2019/6/25
	 * @params [tableId, tableName]
	 * @return      
	 **/
	public Attachment(String tableId, String tableName ,String fileType) {
		super();
		this.tableId = tableId;
		this.tableName = tableName;
		this.fileType = fileType;
	}

	public Attachment(String id){
		super(id);
	}

	@Length(min=0, max=64, message="表ID长度必须介于 0 和 64 之间")
	public String getTableId() {
		return tableId;
	}

	public void setTableId(String tableId) {
		this.tableId = tableId;
	}
	
	@Length(min=0, max=50, message="表名长度必须介于 0 和 50 之间")
	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	
	@Length(min=0, max=120, message="图片路径信息(原图)长度必须介于 0 和 120 之间")
	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}
	
	@Length(min=0, max=50, message="文件类型长度必须介于 0 和 50 之间")
	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}
	
	@Length(min=0, max=50, message="文件大小长度必须介于 0 和 50 之间")
	public String getFileSize() {
		return fileSize;
	}

	public void setFileSize(String fileSize) {
		this.fileSize = fileSize;
	}
	
	@Length(min=0, max=100, message="文件名称长度必须介于 0 和 100 之间")
	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getFile() {
		return file;
	}

	public void setFile(String file) {
		this.file = file;
	}
}